/**
 * MatrixHelper
 * @private
 */
jsx3.lang.Class.defineClass("ux.core.util.MatrixHelper", null, null,
        function(matrixHelper) {
            matrixHelper.formatter = new jsx3.util.DateFormat("MM/dd/yyyy hh:mm:ss aa", ux.core.System.getServer().getLocale())


            // returns true if CDF string s1 has the same data as CDF string s2;
            // ignore "jsxselected" like UI specific attribute.
            matrixHelper.isDataEqual = function(s1, s2) {
                return s1.replace(/ jsxselected=\"(1|0)\"/, "") == s2.replace(/ jsxselected=\"(1|0)\"/, "")
            }

            matrixHelper.formatDate = function(myDateLong) {
                var formattedDate;
                try {
                    formattedDate = matrixHelper.formatter.format(new Date(Number(myDateLong)));
                }catch(e) {

                    formattedDate = matrixHelper.formatter.format(new Date());    //if there is a problem, sending
                                                                                //current time
                }
                return formattedDate;
            }
        }
        )
